WriteLine

General Operation Statement

Syntax samples

WRITELINE <file ID>, <string or numeric expression>{,<maximum digits before decimal>, <digits after decimal>}

Description

Writes information to a general write file and starts a new line. WRITELINE always appends to the file unless the file is RESET. Any file that is written to with WRITELINE automatically becomes a text file and will have an end of file marker attached to the end when it is closed.

WRITE and WRITELINE automatically separate values by commas

Valid In

Any logic.

Components

<file ID>

The name of the file as previously defined in the External Files Editor.

<string or numeric expression>

The string or numeric expression to be written to the file. In the output file, quotes will automatically be added to string expressions so that most spreadsheet programs can easily read the file.

<maximum digits before decimal>

When writing real numbers, the maximum number of digits before the decimal. Use this value to line numbers on different lines up on the decimal.

<digits after decimal>

When writing real numbers, the maximum number of digits after the decimal.

Example

The following example uses both WRITE and WRITELINE to record the time when EntA completes processing at Loc1 in a general write file called Rpt.

Process Table

Entity

Location

Operation (min)

EntA

Loc1

WAIT N(7.3,.4)

WRITE Rpt, "EntA Complete at:"

WRITELINE Rpt, CLOCK(min),3,2

Routing Table

Blk

Output

Destination

Rule

Move Logic

 

 

 

 

 

See Also

WRITE, RESET, XWRITE, READ, and FORMAT(). Also see External Files.

Please note

The sum of the maximum digits before and after the decimal must be less than 20.